package com.company.servicename.config;

import com.company.servicename.util.JwtUser;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * @author fangsong.zhang
 * @date 2019/9/23 14:55
 * Copyright zfs
 * 类说明: 用户详情获取实现
 */
@Service
public class UserDetailServiceImpl implements UserDetailsService {

    private String password;

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
        return new JwtUser(s, password, null);
    }
}
